<extend name="Public/publicHTML" />

<block name="content">
<link rel="stylesheet" href="__PUBLIC__/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="__PUBLIC__/bootstrap/css/font-awesome.min.css" />

<section class="content">
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
				<nav class="navbar navbar-default">
				</nav>

				<!--新订单列表 基本信息-->
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title text-center">基本信息</h3>
					</div>
					<div class="panel-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<td>订单 ID:</td>
									<td>订单号:</td>
									<td>会员:</td>
									<td>E-Mail:</td>
									<td>电话:</td>
									<td>应付:</td>
									<td>订单 状态:</td>
									<td>下单时间:</td>
									<td>支付时间:</td>
									<td>支付方式:</td>
								</tr>
								<tr>
									<td>{$order.id}</td>
									<td>{$order.order_sn_id}</td>
									<td><a href="#" target="_blank">{$order.username}</a></td>
									<td><a href="#">{$order.email}</a></td>
									<td>{$order.mobile}</td>
									<td>{$order.price_sum}</td>
									<td id="order-status">{$orderStatus[$order['order_status']]}</td>
									<td>{$order.create_time|date='Y-m-d H:i',###}</td>
									<td><if condition="$orderStatus[$order['order_status']] == 1">
										{$order.update_time|date='Y-m-d H:i',###} <else /> N </if></td>
									<td id="pay-type">{$order.pay_name|default='微信支付'}</td>
								</tr>

							</tbody>
						</table>
					</div>
				</div>
				<!--新订单列表 收货人信息-->
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title text-center">收货信息</h3>
					</div>
					<div class="panel-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<td>收货人:</td>
									<td>联系方式:</td>
									<td>地址:</td>
									<td>邮编:</td>
									<td>配送方式:</td>

								</tr>
								<tr>
									<td>{$receive.realname}</td>
									<td>{$receive.mobile}</td>
									<td>{$receive.prov}、{$receive.city}、{$receive.dist}、{$receive.address}</td>
									<td><if condition="$receive.zipcode neq ''">
										{$receive.zipcode} <else /> N </if></td>
									<td>顺丰</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<!--新订单列表 商品信息-->
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title text-center">商品信息</h3>
					</div>
					<div class="panel-body">
						<table class="table table-bordered">
							<thead>
								<tr>
									<td class="text-left">商品</td>
									<td class="text-right">数量</td>
									<td class="text-right">单品价格</td>
									<td class="text-right">单品小计</td>
								</tr>
							</thead>
							<tbody>
								<volist name="goods" id="good">
								<tr>
									<td class="text-left"><a
										href="{:U('Home/Goods/goods_details',array('id'=>$good['goods_id']))}"
										target="_blank">  {$good.title}</a></td>
									<td class="text-right">{$good.goods_num}</td>
									<td class="text-right">{$good.goods_price}</td>
									<td class="text-right">{$good['goods_price'] *$good['goods_num']}</td>
								</tr>
								<php>$price += $good['goods_price'] *$good['goods_num'];</php>
								</volist>

								<tr>
									<td colspan="3" class="text-right">小计:</td>
									<td class="text-right">{$price}</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<!--新订单列表 操作信息-->
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title text-center">操作信息</h3>
					</div>
					<div class="panel-body">
						<table class="table table-bordered">
							<tbody>
								<tr>
									<div class="row">
										<td class="text-right col-sm-2"><p class="margin">当前可执行操作：</p></td>
										<td colspan="3">
											<div class="input-group">
												<switch name="order['order_status']">
													<case value="1">
														<a class="btn btn-primary margin" href="{:U('sendGoods',array('order_id'=>$order['id']))}">发货</a>
													</case>
													
													<case value="5">
														<button class="btn btn-primary margin"
															onclick="Sender.returnGoods({$order.id},'{:U('ReturnOrder')}')"
														type="button" id="confirm">退货</button>
														
														<button class="btn btn-primary margin"
															onclick="Sender.noReturn({$order.id},'{:U('noReturn')}')"
														type="button" id="confirm">不予退货</button>
													</case>
												</switch>
											</div>
										</td>
									</div>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>
<script src="__PUBLIC__/Admin/js/sendGoods.js"></script>
</block>